package engine.loader;

import engine.render.Texture;
import java.util.HashMap;

public class LoaderTexture
{
    
    private HashMap<String, Texture> textureMap;
    
    public LoaderTexture()
    {
        this.textureMap = new HashMap<>();
    }
    
    public void loadTexture(String fileName)
    {
        Texture textureFile = new Texture(fileName);
        this.textureMap.put(fileName, textureFile);
    }
    
    public Texture getTexture(String fileName)
    {
        Texture texture = this.textureMap.get(fileName);
        return texture;
    }
    
    public void destroy()
    {
        this.textureMap.clear();
        this.textureMap = null;
    }
    
}
